package com.cxj.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cxj.domain.Booking;
import com.cxj.service.BookingService;
import com.cxj.mapper.BookingMapper;
import com.cxj.vo.SelectBookingByUserNameRes;
import com.cxj.vo.UserInsertBookingReq;
import com.cxj.vo.UserUpdateBookingReq;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
* @author 宋小帅和李小美的computer
* @description 针对表【booking(预约表)】的数据库操作Service实现
* @createDate 2025-02-10 19:44:08
*/
@Service
public class BookingServiceImpl extends ServiceImpl<BookingMapper, Booking>
    implements BookingService{

    @Resource
    private BookingMapper bookingMapper;

    @Override
    public SelectBookingByUserNameRes selectBookingByUserName(String bookingName) {
        SelectBookingByUserNameRes res = bookingMapper.selectBookingByUserName(bookingName);
        return res;
    }
    @Override
    public Boolean userInsertBooking(UserInsertBookingReq userInsertBookingReq) {
        Boolean res = bookingMapper.userInsertBooking(userInsertBookingReq);
        return res;
    }

    @Override
    public Boolean userDeleteBooking(String ymName,String bookingName) {
        Boolean res = bookingMapper.userDeleteBooking(ymName,bookingName);
        return res;
    }

    @Override
    public Boolean userUpdateBooking(UserUpdateBookingReq userUpdateBookingReq) {
        Boolean res = bookingMapper.userUpdateBooking(userUpdateBookingReq);
        return res;
    }
}




